﻿using Basefr.Attributes;
using Paas.Core.Const.Enums;
using Paas.Core.Meta.Entities;
using Paas.Core.MetaForms.Entities;
using Paas.Core.MetaTables.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Paas.Core.MetaViews.Entities
{
    /// <summary>
    /// 元数据视图
    /// </summary>
    [MainTable(nameof(MetaView))]
    public class MetaView : BaseEntity
    {
        /// <summary>
        /// 对象所属的应用
        /// </summary>
        public int? ApplicationId { get; set; }

        /// <summary>
        /// 视图所属的对象
        /// </summary>
        public string ObjectId { get; set; }

        /// <summary>
        /// 视图英文名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 视图的显示名称，默认中文
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 元数据状态
        /// </summary>
        public MetaStatus? CurrentStatus { get; set; }

        #region 包含元素
        /// <summary>
        /// 搜索表单Id
        /// </summary>
        public Guid? MetaSearchFormId { get; set; }
        public virtual MetaForm MetaSearchForm { get; set; }
        /// <summary>
        /// 数据表格Id
        /// </summary>
        public Guid? MetaTableId { get; set;}
        public virtual MetaTable MetaTable { get; set; }
        /// <summary>
        /// 添加按钮Id（先用这个，后期定制按钮组时可不用）
        /// </summary>
        public Guid? MetaAddButtonFormId { get; set;}
        public virtual MetaForm MetaAddButtonForm { get; set; }
        /// <summary>
        /// 按钮组Id
        /// </summary>
        //public string MetaButtonGroupId { get; set;}
        #endregion
    }

}
